package app.vendorportal.api.marketplace.data.request;

import app.vendorportal.api.data.FeedType;
import app.vendorportal.api.marketplace.data.PickTicket;

import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author carl.you
 */
@XmlRootElement(name = "submit-order-request")
@XmlAccessorType(XmlAccessType.FIELD)
public class SubmitOrderRequest {

    @NotNull(message = "vendor number is required")
    @XmlElement(name = "vendor-number")
    private String vendorNumber;

    @XmlElement(name = "create-date")
    private Date createDate;

    @NotNull(message = "pick tickets is required")
    @XmlElement(name = "pick-tickets")
    private final List<PickTicket> pickTickets = new ArrayList<>();

    @XmlElement(name = "total-number-of-orders")
    private String totalNumberOfOrders;

    @XmlElement(name = "update-type")
    private FeedType updateType;


    public String getVendorNumber() {
        return vendorNumber;
    }

    public void setVendorNumber(String vendorNumber) {
        this.vendorNumber = vendorNumber;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getTotalNumberOfOrders() {
        return totalNumberOfOrders;
    }

    public void setTotalNumberOfOrders(String totalNumberOfOrders) {
        this.totalNumberOfOrders = totalNumberOfOrders;
    }

    public FeedType getUpdateType() {
        return updateType;
    }

    public void setUpdateType(FeedType updateType) {
        this.updateType = updateType;
    }

    public List<PickTicket> getPickTickets() {
        return pickTickets;
    }

}
